﻿using System;
using System.Text;
using IAM.Interface.Model.ENUM;

namespace IAM.Interface.Common.Context
{
    /// <summary>
    /// 传送控制类实体对象
    /// </summary>
    public class RequestContextModel
    {
        #region 构造函数
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="actiontype">操作类型</param>
        /// <param name="operationtype">身份管理类型</param>
        /// <param name="obj">发送和接收的对象</param>
        /// <param name="returnType">返回的类型</param>
        /// <param name="apptype">交互系统</param>
        public RequestContextModel(
            ActionType actiontype,
            OperationType operationtype,
            object obj,
            Type returnType,
            AppType apptype)
        {
            _actiontype = actiontype;
            _operationtype = operationtype;
            _obj = obj;
           _returnType = returnType;
           _apptype = apptype;
        }
        #endregion
        #region 属性
        private ActionType _actiontype = ActionType.AUDIT_FETCH;
        private OperationType _operationtype = OperationType.Create;
        private object _obj = null;
        private System.Type _returnType = null;
        private AppType _apptype = AppType.AD;

        /// <summary>
        /// 操作类型
        /// </summary>
        public ActionType ActionType
        {
            set
            {
                _actiontype = value;
            }
            get
            {
                return _actiontype;
            }
        }
        /// <summary>
        /// 身份管理类型
        /// </summary>
        public OperationType OperationType
        {
            get
            {
                return _operationtype;
            }
            set
            {
                _operationtype = value;
            }
        }
        /// <summary>
        /// 发送和接收的对象
        /// </summary>
        public object Obj
        {
            get
            {
                return _obj;
            }
            set
            {
                _obj = value;
            }
        }
        /// <summary>
        /// 返回的类型
        /// </summary>
        public Type ReturnType
        {
            get
            {
                return _returnType;
            }
            set
            {
                _returnType = value;
            }
        }
        /// <summary>
        /// 交互系统
        /// </summary>
        public AppType AppType
        {
            get
            {
                return _apptype;
            }
            set
            {
                _apptype = value;
            }
        }
        #endregion
    }
}
